package com.itheima.exception;

public class Demo01 {

    public static void main(String[] args) {


        try {
            method();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static void method() {
       int [] arr=null;
        if (arr == null) {
            throw new NullPointerException();
        }
        System.out.println(arr[5]);
    }
}
